package product;

public class Computer {
    private String cpu;
    private String memory;
    private String hardDisk;
    private String graphicsCard;

    // 设置方法
    public void setCpu(String cpu) {
        this.cpu = cpu;
    }

    public void setMemory(String memory) {
        this.memory = memory;
    }

    public void setHardDisk(String hardDisk) {
        this.hardDisk = hardDisk;
    }

    public void setGraphicsCard(String graphicsCard) {
        this.graphicsCard = graphicsCard;
    }

    @Override
    public String toString() {
        return "Computer [cpu=" + cpu + ", memory=" + memory + ", hardDisk=" + hardDisk + ", graphicsCard=" + graphicsCard + "]";
    }
}